package com.xiaoai.timedtask.quartz;

import org.quartz.*;

import java.util.Date;

/**
 * quartz任务
 * 同步执行
 * 相同的任务实例
 *
 * @Author
 * @Date 2021-08-30 23:00
 */
@DisallowConcurrentExecution
public class MyJobbySync implements Job {
    private String name;

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void execute(JobExecutionContext contex) throws JobExecutionException {
        System.out.println(contex.getJobDetail().hashCode());
        System.out.println(contex.getTrigger().hashCode());
    }

}
